<div class="ibox">
 <div class="ibox-content">		
	<form id="edit" class="form-horizontal" method="post" action="${cxt!}/admin/developer/edit" >
		<input type="hidden" name="id" value="${customerDeveloperInput.id!}">
		<input type="hidden" name="userid" value="${customerInput.id!}">
		<input type="hidden" name="addressid" value="${customerAddressInput.id!}">
		<div class="form-group">
			<div class="col-md-6 control-label" id="uploadprofileimgDiv" style="display: inline-block;*display:inline;*zoom:1;">
				<%#ajax uploadprofileimg:{%>
					<input type="hidden" name="customerEdit.profile" value="${uploadFile.path!}"/>
					
					<a href="#">
						<%
						  if(isEmpty(uploadFile!)){
							if(!isEmpty(customerInput.profile!)){
						%>
							<img alt="" src="${imgCxt!}/${customerInput.profile!}" width="144" height="144">
							<%}else{%>
							  <img src="${bImgCxt!}/img/tupian.jpg" width="144" height="144">							  
							<%}%>
						<%}else{%>
						<img src="${imgCxt!}/${uploadFile.path!}" width="144" height="144">
						<%}%>
					</a>
				<%}%>
			</div>
			<a href="#" id="uploadprofileimg">
				<img src="${cxt!}/img/xiangji.jpg" alt="${_res['system.upload']}" />
			</a>
			<input type="file" style="opacity:0" id="fileuploadprofileimg" name="profileimg">
			
		</div>
		
		<div class="row">
			<!-- 用户名 -->
			<div class="col-md-5">
				<div class="form-group">
					<label for="userid" class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.username"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" readonly="readonly" id="username" name="customerEdit.username" value="${customerInput.username!}" required aria-required="true">
					</div>
				</div>
			</div>
			
			<!-- 开发商名 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.developerName"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="developerName" name="developerEdit.companyname" value="${customerDeveloperInput.companyname!}" required aria-required="true">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- CEO姓名 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.CEOName"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="CEOName" name="developerEdit.ceoname" value="${customerDeveloperInput.ceoname!}" required aria-required="true">
			         </div>
				</div>
			</div>
			
			<!-- 总部地址 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.address"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="address" name="customerAddressEdit.address1" value="${customerAddressInput.address1!}" required aria-required="true">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- 城市/区 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.city"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="city" name="customerAddressEdit.city" value="${customerAddressInput.city!}" required aria-required="true">
			         </div>
				</div>
			</div>
			
			<!-- 州/省-->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.state"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="state" name="customerAddressEdit.state" value="${customerAddressInput.state!}" required aria-required="true">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- 国际码 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.internationcode"]}</label>
					<div class="col-md-8">
						<#dict type="select" class="form-control" name="customer.internationalcode" value="${customerInput.internationalcode!}" dictCode="INTERNATIONAL_CODE" required="true"/>
			         </div>
				</div>
			</div>
			
			<!-- 国家 -->
			<div class="col-md-5">
				<div class="form-group">
				  <label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.country"]}</label>
				  <div class="col-md-8">
					<#dict type="select" class="form-control" name="customerAddressEdit.country" value="${customerAddressInput.country!}" table="country_region" filedName="name" filedValue="id" required="true" ordercolumn="nameen"/>
		           </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- 手机号码 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.phone"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" readonly="readonly" id="phone" name="customerEdit.telephone" value="${customerInput.telephone!}" required aria-required="true" data-rule-number="true">
			         </div>
				</div>
			</div>
			
			<!-- email-->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["customer.email"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="email" name="customerEdit.email" value="${customerInput.email!}" required aria-required="true" data-rule-email="true" data-msg-email="${_res['developer.email']}">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- 公司电话 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.companyTel"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" readonly="readonly" id="telephone" name="developerEdit.telephone" value="${customerDeveloperInput.telephone!}" required aria-required="true" data-rule-number="true">
			         </div>
				</div>
			</div>
			
			<!-- 公司传真 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.fax"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="fax" name="developerEdit.fax" value="${customerDeveloperInput.fax!}" required aria-required="true" data-rule-number="true">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- ABN -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.abn"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="abn" name="developerEdit.abn" value="${customerDeveloperInput.abn!}" required aria-required="true" data-rule-number="true">
			         </div>
				</div>
			</div>
			
			<!-- ACN -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.acn"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="acn" name="developerEdit.acn" value="${customerDeveloperInput.acn!}" required aria-required="true" data-rule-number="true">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- 联系人姓名 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.contactPersonName"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="linkname" name="developerEdit.contactpersonname" value="${customerDeveloperInput.contactpersonname!}">
			         </div>
				</div>
			</div>
			
			<!-- 公司网址 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.website"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="site" name="developerEdit.website" value="${customerDeveloperInput.website!}">
			         </div>
				</div>
			</div>
		</div>
		
		<div class="row">
			<!-- 公司成立日期 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.founddate"]}</label>
					<div class="col-md-8">
						<input type="text"  style="max-width: 420px;" class="laydate-icon form-control layer-date" onclick="laydate()" id="companycreatetime" name="developerEdit.founddate" value="${customerDeveloperInput.founddate!}">
			         </div>
				</div>
			</div>
			
			<!-- 公司员工数 -->
			<div class="col-md-5">
				<div class="form-group">
					<label class="col-md-4 control-label"><span class="fontColorRed">*</span>${_res["developer.employees"]}</label>
					<div class="col-md-8">
						<input type="text" class="form-control" id="employees" name="developerEdit.employees" value="${customerDeveloperInput.employees!}" required aria-required="true" data-rule-number="true">
			         </div>
				</div>
			</div>
		</div>
		
		<!-- 公司操作区域 -->
		<div class="row">
		  <div class="col-md-5">
		   <div class="form-group">
	          <label class="col-md-4 control-label">${_res["developer.operationarea"]}</label>
	          <div class="col-md-8">
	            <#dict  type="checkbox" name="operationarea" id="operationarea" value="${customerDeveloperInput.operationarea!}" needIndex="false" dictCode="AUSTRALIA_STATE" />
	          </div>
		   </div>
		  </div>
		 </div>
		
		<!-- 公司简介 -->
		<div class="row">
		  <div class="col-md-10">
			<div class="form-group">
				<label class="col-md-2 control-label"><span class="fontColorRed">*</span>${_res["developer.companyprofile"]}</label>
				<div class="col-md-10">
					<textarea rows="2" cols="98" style="width:100%" name="developerEdit.companyprofile">${customerDeveloperInput.companyprofile!}</textarea>
		         </div>
			</div>
		   </div>
		 </div>	
		 <div class="row">
			<div class="form-group">
		       <div class="col-md-4 col-md-offset-2 control-label">
		       		<% if(hasPrivilegeUrl("developerList")){ %>
		         	<button type="button" class="btn btn-warning" onClick="ajaxContent('/admin/developer/list')">${_res["system.return"]}</button>
		         	<%}%>
		         	<button type="button" onclick="ajaxForm('content','edit');" class="btn btn-primary">${_res["system.save"]}</button>
		       </div>
	       </div>
       </div>
	</form>
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	
	$("a[id^='upload']").on('click', function() {
		var id = $(this).attr("id");
		$("#file" + id).click();
	});
	
	$("input[id^='fileupload']").on('change', function() {
		var fileElementId = $(this).attr("id");
		ajaxFileUpload2("uploadprofileimgDiv",fileElementId,"/realty/customer/developer/editDeveloper.html#uploadprofileimg","customer");
	});

});

</script>
